/*******************************************************************************
 * Copyright 2010 Ben Knowles
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package org.example;

import com.midtro.attolog.AttoLogger;

public class Example {
	
	private static AttoLogger LOGGER = new AttoLogger(Example.class);

	public static void main(String[] args){
		LOGGER.info("Message from outter class");

		ExampleInner inner = new ExampleInner();
		inner.sayHello();
		
		LongNameExample longName = new LongNameExample();
		longName.test();
	}
	
	private static class ExampleInner {
		private static AttoLogger LOGGER = new AttoLogger(ExampleInner.class);

		public void sayHello(){
			LOGGER.info("Hello");
			LOGGER.infoObject("intArrayTest", new int[]{1, 2, 3, 4});
			LOGGER.infoObject("longArrayTest", new long[]{1, 2, 3, 4});
			LOGGER.infoObject("floatTest", 3000.6f);
			LOGGER.ludicrous("Very ludicrous message");
			LOGGER.warn("Test warning");
		}
	}
	
	private static class LongNameExample {
		private static AttoLogger LOGGER = new AttoLogger(LongNameExample.class, true);
		
		public void test(){
			LOGGER.info("Printing with a long name");
		}
	}
}
